import { https, request } from "./index";

export const getMaterialList = (data) => {
  return request.get(
    `/mark/online/material/list?workPackId=${data.workPackId}&sign=${data.sign}`
  );
};

export const getInfo = (data) => {
  return request.get(
    `/mark/online/pack/info?workPackId=${data.workPackId}&sign=${data.sign}`
  );
};

export const getDataList = (data) => {
  return request.post("/mark/online/data/list?sign=" + data.sign, {
    workPackId: data.workPackId,
  });
};

export const save = (data, sign) => {
  return request.post("/mark/online/data/save?sign=" + sign, data);
};

export const statistics = (data, sign) => {
  return request.post("/mark/online/data/statistics?sign=" + sign, data);
};

export const submit = (data, sign) => {
  return request.post("/mark/online/pack/submit?sign=" + sign, data);
};
export const rollback = (data, sign) => {
  return request.post("/mark/online/pack/rollback?sign=" + sign, data);
};
//图片路径
export const filePath = (data) => {
  return https.get("image?filePath=" + data);
};
